export default {
	namespaced: true,
	state: {
		SansFontLoad: false,
		useEvStyle: false, //A300风格
		supportAnimation: true,
		supportAi: false,
		useAiPro: false,
		aiModel: 'QianWen', //QianWen | DeepSeek
		productDomain: true, //使用正式域名
		city: '深圳',
		evhomeLoad: false,
		temperature: null, //室外温度,字符串
		wenjuan: {},
		printBleRealTimeMsg: false, //打印A300设备的蓝牙实时数据日志
		csPosition: {}, //在线客服坐标位置
		notificationOpened: true, //通知权限开启状态
		notificationClicked: false, //通知权限的弹框是否已确认过
		notifacationExecd: false, //是否调用过通知权限检测
		notificationMsgCode: null, //系统消息code
		hardBackMode: false, //固件版本后台模式

		g4Status: 0, //4G模块连接状态 0:未连接 1:已连接
		isLoadData: false,
		allowHomeAniRender: false, //是否允许首页动画渲染(耗时,卡UI)
		swiperEnabled: false, //首页动画图层是否允许手势/swiper切换
		homePageLoad: false, //首页是否已加载
		showCanConfig: false, //显示CAN数据库配置按钮

		/* socket相关 */
		forbidSocketConnect: false, //是否禁止socket重连
		socketOpened: false, //socket状态 开启/关闭
		socketTimer: null, //socket重连间隔计时
		socketRetryTimeout: null, //socket重试计时
		socketDeviceId: '', //socket目标设备ID
		socketDataType: '', //socket实时数据请求类型
		beatTimer: null, //socket心跳计时
		showLinkErrorModal: false, //显示双链路断连弹框
		socketDataInterval: null, //socket实时数据加速

		unReadMsgCount: 0, //推送消息未读数
		advertList: [], //广告列表
		warningTemplateList: [], //报警模板列表
		isAsynced: false, //是否已异步加载过
		paddingCostCount: 0, //待补充金额充电记录数

		aiChatList: [],
		showPrivacy: false, //是否显示免责声明弹框

		iatRecorder: null, //实时语音对象
	},
	getters: {
		SansFontLoad: (state) => state.SansFontLoad,
		useEvStyle: (state) => state.useEvStyle,
		supportAnimation: (state) => state.supportAnimation,
		supportAi: (state) => state.supportAi,
		useAiPro: (state) => state.useAiPro,
		aiModel: (state) => state.aiModel,
		city: (state) => state.city,
		evhomeLoad: (state) => state.evhomeLoad,
		temperature: (state) => state.temperature,
		wenjuan: (state) => state.wenjuan,
		printBleRealTimeMsg: (state) => state.printBleRealTimeMsg,
		csPosition: (state) => state.csPosition,
		notificationOpened: (state) => state.notificationOpened,
		notificationClicked: (state) => state.notificationClicked,
		notifacationExecd: (state) => state.notifacationExecd,
		notificationMsgCode: (state) => state.notificationMsgCode,
		hardBackMode: (state) => state.hardBackMode,
		g4Status: (state) => state.g4Status,
		isLoadData: (state) => state.isLoadData,
		allowHomeAniRender: (state) => state.allowHomeAniRender,
		swiperEnabled: (state) => state.swiperEnabled,
		homePageLoad: (state) => state.homePageLoad,
		showCanConfig: (state) => state.showCanConfig,
		forbidSocketConnect: (state) => state.forbidSocketConnect,
		socketOpened: (state) => state.socketOpened,
		socketRetryTimeout: (state) => state.socketRetryTimeout,
		socketTimer: (state) => state.socketTimer,
		socketDeviceId: (state) => state.socketDeviceId,
		socketDataType: (state) => state.socketDataType,
		beatTimer: (state) => state.beatTimer,
		showLinkErrorModal: (state) => state.showLinkErrorModal,
		socketDataInterval: (state) => state.socketDataInterval,
		unReadMsgCount: (state) => state.unReadMsgCount,
		advertList: (state) => state.advertList,
		warningTemplateList: (state) => state.warningTemplateList,
		isAsynced: (state) => state.isAsynced,
		paddingCostCount: (state) => state.paddingCostCount,
		aiChatList: (state) => state.aiChatList,
		productDomain: (state) => state.productDomain,
		showPrivacy: (state) => state.showPrivacy,
		iatRecorder: (state) => state.iatRecorder,
	},
	mutations: {
		setProductDomain(state, value) {
			state.productDomain = value
		},
		setSansFontLoad(state, value) {
			state.SansFontLoad = value
		},
		setUseEvStyle(state, value) {
			state.useEvStyle = value
		},
		setSupportAnimation(state, value) {
			state.supportAnimation = value
		},
		setSupportAi(state, value) {
			state.supportAi = value
		},
		setUseAiPro(state, value) {
			state.useAiPro = value
		},
		setAiModel(state, value) {
			state.aiModel = value
		},
		setEvhomeLoad(state, value) {
			state.evhomeLoad = value
		},
		setCity(state, value) {
			state.city = value
		},
		setTemperature(state, value) {
			state.temperature = value
		},
		setWenjuan(state, value) {
			state.wenjuan = value
		},
		setPrintBleRealTimeMsg(state, value) {
			state.printBleRealTimeMsg = value
		},
		setCsPosition(state, value) {
			state.csPosition = value
		},
		setNotificationOpened(state, value) {
			state.notificationOpened = value
		},
		setNotificationClicked(state, value) {
			state.notificationClicked = value
		},
		setNotifacationExecd(state, value) {
			state.notifacationExecd = value
		},
		setNotificationMsgCode(state, value) {
			state.notificationMsgCode = value
		},
		setHardBackMode(state, value) {
			state.hardBackMode = value
		},
		setG4Status(state, value) {
			state.g4Status = value
		},
		setIsLoadData(state, value) {
			state.isLoadData = value
		},
		setAllowHomeAniRender(state, value) {
			state.allowHomeAniRender = value
		},
		setSwiperEnabled(state, value) {
			state.swiperEnabled = value
		},
		setHomePageLoad(state, value) {
			state.homePageLoad = value
		},
		setShowCanConfig(state, value) {
			state.showCanConfig = value
		},
		setForbidSocketConnect(state, value) {
			state.forbidSocketConnect = value
		},
		setSocketOpened(state, value) {
			state.socketOpened = value
		},
		setSocketRetryTimeout(state, value) {
			state.socketRetryTimeout = value
		},
		setSocketTimer(state, value) {
			state.socketTimer = value
		},
		setSocketDeviceId(state, value) {
			state.socketDeviceId = value
		},
		setSocketDataType(state, value) {
			state.socketDataType = value
		},
		setBeatTimer(state, value) {
			state.beatTimer = value
		},
		setShowLinkErrorModal(state, value) {
			state.showLinkErrorModal = value
		},
		setSocketDataInterval(state, value) {
			state.socketDataInterval = value
		},
		setUnReadMsgCount(state, value) {
			state.unReadMsgCount = value
		},
		setAdvertList(state, value) {
			state.advertList = value
		},
		setWarningTemplateList(state, value) {
			state.warningTemplateList = value
		},
		setIsAsynced(state, value) {
			state.isAsynced = value
		},
		setPaddingCostCount(state, value) {
			state.paddingCostCount = value
		},
		setAiChatList(state, value) {
			state.aiChatList = value
		},
		setShowPrivacy(state, value) {
			state.showPrivacy = value
		},
		setIatRecorder(state, value) {
			state.iatRecorder = value
		}
	}
}